bitkeeper revision 1.559.1.2 (3fa8e59fjgu1Rm3Cu-9n7CbSrKjgAg)
authorsmh22@labyrinth.cl.cam.ac.uk <smh22@labyrinth.cl.cam.ac.uk>
Wed, 5 Nov 2003 11:57:19 +0000 (11:57 +0000)
committersmh22@labyrinth.cl.cam.ac.uk <smh22@labyrinth.cl.cam.ac.uk>
Wed, 5 Nov 2003 11:57:19 +0000 (11:57 +0000)
manual merge

xen/drivers/block/xen_block.c
xen/include/hypervisor-ifs/vbd.h

index f989f2ed0687d7f94767532fd94998b6609cd2f9..97f51e02f1bd38756ac8b2fd07151dd08f9f2378 100644 (file)
@@ -235,6 +235,11 @@ long do_block_io_op(block_io_op_t *u_block_io_op)
         }
         break;
 
+    case BLOCK_IO_OP_RING_ADDRESS:
+        op.u.ring_mfn = virt_to_phys(p->blk_ring_base) >> PAGE_SHIFT;
+        ret = copy_to_user(u_block_io_op, &op, sizeof(op)) ? -EFAULT : 0;
+        break;
+
     case BLOCK_IO_OP_VBD_CREATE:  
        /* create a new VBD for a given domain; caller must be privileged  */
        if(!IS_PRIV(p))
index ed7158c88935287d45ccb23adb2e6dab7d9aa0b3..31c45bf529c759d3ffca5d43b44f550a2307020f 100644 (file)
@@ -36,12 +36,13 @@ typedef struct {
 /* Block I/O trap operations and associated structures.
  */
 
-#define BLOCK_IO_OP_SIGNAL      0    /* let xen know we have work to do */ 
-#define BLOCK_IO_OP_RESET       1    /* reset ring indexes on quiescent i/f */
-#define BLOCK_IO_OP_VBD_CREATE  2    /* create a new VBD for a given domain */
-#define BLOCK_IO_OP_VBD_ADD     3    /* add an extent to a given VBD */
-#define BLOCK_IO_OP_VBD_REMOVE  4    /* remove an extent from a given VBD */
-#define BLOCK_IO_OP_VBD_DELETE  5    /* delete a VBD */
+#define BLOCK_IO_OP_SIGNAL       0    /* let xen know we have work to do */ 
+#define BLOCK_IO_OP_RESET        1    /* reset ring indexes on quiescent i/f */
+#define BLOCK_IO_OP_RING_ADDRESS 2 /* returns machine address of I/O ring */
+#define BLOCK_IO_OP_VBD_CREATE   3    /* create a new VBD for a given domain */
+#define BLOCK_IO_OP_VBD_ADD      4    /* add an extent to a given VBD */
+#define BLOCK_IO_OP_VBD_REMOVE   5    /* remove an extent from a given VBD */
+#define BLOCK_IO_OP_VBD_DELETE   6    /* delete a VBD */
 
 
 typedef struct _xen_extent { 
@@ -84,11 +85,12 @@ typedef struct block_io_op_st
     union
     {
         /* no entry for BLOCK_IO_OP_SIGNAL */
+        /* no entry for BLOCK_IO_OP_RESET  */
+       unsigned long ring_mfn; 
        vbd_create_t  create_info; 
        vbd_add_t     add_info; 
        vbd_remove_t  remove_info; 
        vbd_delete_t  delete_info; 
-        /* no entry for BLOCK_IO_OP_RESET  */
     }
     u;
 } block_io_op_t;